import cv2 as cv
import time

img1 = cv.imread('data/messi5.jpg')
e1 = cv.getTickCount()
for i in range(5,49,2):
    img1 = cv.medianBlur(img1,i)
e2 = cv.getTickCount()
t = (e2 - e1)/cv.getTickFrequency()
print( t, 's' )

t1 = time.time()
e1 = cv.getTickCount()
for i in range(5,49,2):
    img1 = cv.medianBlur(img1,i)
e2 = cv.getTickCount()
tt = (e2 - e1)/cv.getTickFrequency()
t2 = time.time()
t = t2 - t1
print( tt, 's', tt*1000, 'ms' )
print( t, 's', t*1000, 'ms'  )